home *** CD-ROM | disk | FTP | other *** search
- global gLookInBookFolder, gResourceFolderName, gResourcePaths
- put getstackpath() into gsp
- if ((last char of gResourceFolderName¡":") and (gResourceFolderName ¡ "")) then
- put ":" after gResourceFolderName
- end if
- if gLookInBookFolder = "true" then
- if gResourceFolderName = "" then
- put gsp into gResourcePaths
- else if gResourceFolderName ¡ "" then
- if gResourceFolderName = gsp then
- put "" into gResourceFolderName
- put gsp into gResourcePaths
- else
- put the itemdelimiter into id
- set the itemdelimiter to ":"
- put gResourceFolderName into gf
- repeat while the number of items in gf > 1
- delete item 1 of gf
- end repeat
- set the itemdelimiter to id
- if (gf¡"") then
- put gsp&gf into gResourcePaths
- put gResourcePaths&return&listAllFolders(gResourcePaths) into gResourcePaths
- end if
- end if
- end if
- else if gLookInBookFolder = "false" then
- if gResourceFolderName = "" then
- put gsp into gResourcePaths
- else
- put gResourceFolderName into gResourcePaths
- if (gResourcePaths¡"") then
- put gResourcePaths&return&listAllFolders(gResourcePaths) into gResourcePaths
- end if
- end if
- else
- put "true" into gLookInBookFolder
- put "" into gResourceFolderName
- put gsp into gResourcePaths
- end if